Using the Java Transaction API
Table 5-2 lists which databases are supported for the Java Transaction API (JTA) by the JDBC Client.
Once a JDBC data source has been registered with JNDI, it can be used by your JDBC application as shown in the following example, typically through application server software:
Context ctx = new InitialContext(); XADataSource ds = (XADataSource) ctx.lookup("jdbc/EmployeeDB"); XAConnection xacon = ds.getXAConnection("scott", "tiger");In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the JDBC data source. The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.XADataSource object. Finally, the XADataSource.getXAConnection() method is called to establish a connection with the SequeLink service.
See "Creating and Managing JDBC Data Sources" for instructions on creating JDBC data sources.